export const ErrorCodeMsg = {
    "1-1-1-V-1002": "Unexpected Error",
    "1-1-1-V-1003": "Your session is expired. Please login again.",  // session expired error.
    "1-1-1-V-2001": "Please input Report title for the report", //remark;
    "1-1-1-V-2002": "Please select criteria for your query.", //used in ipstep2;
    "1-1-1-V-2003": "'r%0' is missing.", //form items validation;
    "1-1-1-V-2004": "Characters |, \", \\ and TAB are not allowed in this field", //form items validation;
    "1-1-1-V-2004_1": "Invalid input", //form items validation;
    "1-1-1-V-2004_2": "Characters /, |, \": \\, _ and TAB are not allowed in this field", //form items validation;
    "1-1-1-V-2004_3": "Characters /, |, \": ', \\, !, @, #, $, %, ^, &, *, (, ) and TAB are not allowed in this field.", //form search items validation;
    //"1-1-1-V-2004_4": "Characters /, |, \\ and TAB are not allowed in this field", //request search validation.
    "1-1-1-V-2005": "'r%0' input is invalid. Please input in form of DD/MM/YYYY or use the date picker.", //form items validation;
    "1-1-1-V-2006": "should not be earlier than", //form items validation;
    "1-1-1-V-2007": "'r%0' should be later than or equal to 'r%1'.", //form items validation;
    "1-1-1-V-2008": "'r%0' should be numeric and integral.", //form items validation;
    //"1-1-1-V-2008_1": "'r%0' should be numeric and integral.(1-999)", //form items validation;
    "1-1-1-V-2008_1": "Please input 1-999", //form items validation;
    "1-1-1-V-2009": "'r%0' should be less than 'r%1' characters.", //form items validation;
    "1-1-1-V-2010": "End value should be greater than or equal to start value.", //form items validation;
    "1-1-1-V-2011": "Number of days should be smaller than or equal to 366.", //form items validation;
    "1-1-1-V-2012": "'r%0' should be numeric. You must enter a numeric value with a maximum of r%1 digits before and r%2 digits after the decimal point.", //form items validation;

    "1-1-1-V-2013": "You have chosen not to define / group criteria. " + String.fromCharCode(10) + String.fromCharCode(13) + " You can proceed your request submission at r%0.", //bypass step 2 and step3  (r%0=Step1 - Define Data Scope)
    "1-1-1-V-2013_1": "System will bypass Step 2 & 3 (define / group criteria) (by default) when you have uploaded a patient list.  You can proceed your request submission at r%0.",

    "1-1-1-V-2014": "Criteria of the report have been changed. " + String.fromCharCode(10) + String.fromCharCode(13) + " Please revise criteria relateionships defined at Step 3.",
    "1-1-1-V-2015": "'r%0' should not be earlier than 'r%1'.", //form items validation;
    "1-1-1-V-2016": "Please specify the Hospital(s).", //form items validation;

    "1-1-1-V-2017": "Item \"r%0\" is excluded by item \"r%1\" defined in this layout.", // step4, exclusion rule
    "1-1-1-V-2018": "System has deleted some of your selected criteria based on <br><br>1. Your account security settings<br>2. The changes made at Step 1 Data Scope<br><br>Please revise the selected criteria at Step 2.", // step4, exclution rule
    "1-1-1-V-2019": "Due to change of options in step 1, layout item \"r%0\" has been removed.", // step4, exclusion rule

    "1-1-1-V-2020": "Please define at least one r%0 related element.", // Generic Combo

    "1-1-1-V-2021": "The item: <br><br>r%0<br><br>is already existed in the seletion list.", // step2, check duplicated
    "1-1-1-V-2021_b": "The item: <br><br>r%0<br><br>is already obsoleted. You have to delete / re-define these items.",
    "1-1-1-V-2022": "Your layout template contains expired data item(s).<br>Such data item has been re-defined and the old definition was no longer valid.<br>Please delete / re-define these items.<br><br>They are being marked \"*** OBSOLETED ***\" at the description.", // step4, validation.
    "1-1-1-V-2023": "Please select at least one of the compulsory dimensions for a detail layout!", // step4, validation.

    "1-1-1-V-2024": "Are you sure to delete whole selection criteria?", // Edit Combo

    "1-1-1-V-2025": "Please specify the Specialty(s).", // Step1 form item validation
    "1-1-1-V-2026": "There is no EIS/IPAS Specialty available for your analysis according to <br><br>1. Your account security settings<br>2. The hospital(s) selected on the Hospital Tree.<br><br>Please revise your hospital selection in order to complete this step.", // Step1 form item validation
    "1-1-1-V-2027": "'Period To' exceeds latest data available r%0.", // Step1 form item validation
    "1-1-1-V-2028": "'Report Run Date' should be at least r%0 day(s) later than the 'Period To'.", // Step1 form item validation [To UAT]

    "1-1-1-V-2029": "The analysis period is longer than r%0 month(s). Please shorten your analysis period.", // Step1 form item validation
    "1-1-1-V-2030": "For Discharge Date (Unplanned Readmission), data available date is up to r%0.", // Step1 form item validation

    "1-1-1-V-2031": "The file has not been submitted.<br><br>Please specify the file and click \"Submit\" for submission.", // Step1 form item validation
    "1-1-1-V-2032": "'Start Date' specified in the uploaded file should be later than or equal to CDARS earliest data available date (r%0).", // Step1 form item validation [To UAT]
    "1-1-1-V-2033": "The given date range is out of CDARS's data scope.<br><br>Please revise your request 'Period From'/ 'Period To' in the Uploaded File.",// Step1 form item validation[To UAT]

    "1-1-1-V-2034": "Invalid input in \"Number of months to add before study period start for searching index episodes\"",// Step1 form item validation

    "1-1-1-V-2035": "Please define at least one r%0 related element.", // combo, required field checking
    "1-1-1-V-2036": "For Discharge Date (Unplanned Readmission), data available date is up to r%0.<br>Please revise your request Period From/ Period To in the Uploaded File.", // Step1 form item validation[To UAT]


    "1-1-1-V-2037": "It is not allowed to select the root node.<br>Please define your selection on the expanded branch.", //Ris combo tree restrictions
    "1-1-1-V-2038": "It is not allowed to select the whole category.<br>Please define your selection on the expanded branch.", //Ris combo tree restrictions

    "1-1-1-V-2039": "Please select row/column dimension and measurement for a summary layout!", // Step4 
    "1-1-1-V-2040": "Item \"r%0\" is excluded by item \"r%1\" defined in previous page.", // Step4 - exclution rule

    "1-1-1-V-2041": "Please select at least one specific r%0 in order to define the scope.  'NOT in' is not considered as specific.", // Edit Combo
    "1-1-1-V-2042": "You are not allowed to go to next step when hospital/specialty tree has not finished loading. Please wait.", // Step1 form item validation

    "1-1-1-V-2043": "Please input Query name.", // user defined query
    "1-1-1-V-2044": "You have defined too much criteria.\nPlease remove some criteria and try again.", // user defined query

    "1-1-1-V-2045": "The workgroup 'r%0' is the ancestor of the subject workgroup 'r%1' and hence cannot be added as member of the subject workgroup.", // workgroup conflict

    "1-1-1-V-2046": "The measurement's 'User Defined Query'/'Math Function' is duplicated.", // step4 check duplicate
    "1-1-1-V-2047": "The workgroup is locked by 'r%0' from 'r%1'.", // groupadmin, edit check. the record is lcok
    //"1-1-1-V-2048": "The workgroup 'r%0' cannot be deleted as it is being locked.  Please wait until the workgroup has been finished editing by others.", 
    "1-1-1-V-2048": "The workgroup 'r%0' is being assigned other folder(s), are you sure you want to remove the workgroup?",
    "1-1-1-V-2049": "You cannot create folder under folder 'r%0'.", // no permission to create folder on target folder
    "1-1-1-V-2050": "Are you sure you want to permanently delete this folder?. All your reports in this folder and the sub-folders will be deleted as well.", // repot history (folder maint)
    "1-1-1-V-2051": "There is already a file with the same name in this location.", // folder maint

    "1-1-1-V-2052": "Due to change of criteria in step2, layout item \"r%0\" has to be removed.", // step 4 excludion rule

    "1-1-1-V-2053": "Are you sure you want to delete the whole report 'r%0' ?", // confirm message in delete report history
    "1-1-1-V-2054": "Are you sure you want to delete the whole report 'r%0' ? This is a detail report with sensitive data (e.g. HKID, patient name) which is password protected. Make sure that you have already recorded down the password before deleting the report for opening the exported file.", // confirm message in delete report history
    "1-1-1-V-2055": "Are you sure you want to delete the whole report 'r%0' ? Some of the selected reports consist of sensitive data (e.g. HKID, patient name) which is password protected. Make sure that you have already recorded down the password before deleting the report for opening the exported file.", // confirm message in delete report history
    "1-1-1-V-2056": "Deleting the supporting tables will cause the drill-down report to run for a longer time.<br>Are you sure you want to delete the supporting tables for the report <br>'r%0' ?", // confirm message in delete report history
    "1-1-1-V-2057": "Are you sure you want to delete data of the report 'r%0' ?", // confirm message in delete report history
    "1-1-1-V-2058": "Please select the report which is to be deleted.",

    "1-1-1-V-2059": "Deleting the supporting tables will cause the drill-down report to run for a longer time.<br>Are you sure you want to delete the supporting tables for these \" r%0  \" reports?",
    //"1-1-1-V-2060": "Are you sure to delete the data of these r%0 reports ?",
    "1-1-1-V-2060": "Are you sure to delete these r%0 reports/shortcuts?",

    "1-1-1-V-2061": "It is not allowed to set Sub-Total in the inner-most row dimension.",  // step4 validation.
    "1-1-1-V-2062": "It is not allowed to set Sub-Total to a column or page dimension.",  // step4 validation.
    "1-1-1-V-2062_1": "Duplicate Sub-Total is not allow on row dimension.",  // 20141009
    "1-1-1-V-2062_2": "Duplicate Sub-Total is not allow on column dimension.",  // 20141009
    "1-1-1-V-2062_3": "It is not allowed to set Sub-Total for only one row dimension.",  // 20141009
    "1-1-1-V-2062_4": "It is not allowed to set Sub-Total for only one column dimension.",  // 20141009
    "1-1-1-V-2063": "Folder 'r%0' is suspended.",  // folder valuation

    "1-1-1-V-2064": "\"r%0\"<br><b>cannot be selected because </b><br>\"r%1\" <br><b>is selected.</b>",  // exculdet rule in step2
    "1-1-1-V-2065": "The dimension's 'User Defined Grouping' is duplicated.", // step4 check duplicate
    "1-1-1-V-2066": "There is no EIS/IPAS Specialty available for your analysis subject to <br><br>1. Your account security settings<br>2. The hospital(s) selected on the Hospital Tree.<br><br>Specialty selection at this step is disabled.", // Step1 form item validation

    "1-1-1-V-2067": "The view and export functions are disabled as you are connecting via VPN and this is a detail report.",// if user using VPN and view/export the detail report. alert.

    "1-1-1-V-2068": "Please specify a 'Final Query' before going to the next page.",  //Step3, check final query

    "1-1-1-V-2069": "The security setting does NOT allow item 'r%0' so it is being removed.",  //Step4, preload, check security

    "1-1-1-V-2070": "It is not allowed to move a folder to your personal folders if it contains folder/request not owned by you.", // folder move validation

    "1-1-1-V-2071": "You are not allowed to move folder 'r%0' because you are not the owner or administrator of this folder.", // no permission to move this folder

    "1-1-1-V-2072": "You are not allowed to move folder to folder 'r%0' because you are not owner or administrator of 'r%0'.", // no permission to create folder on target folder

    "1-1-1-V-2073": "You are not allowed to delete folder 'r%0' because you are not owner of this folder.", // no permission to create folder on target folder

    "1-1-1-V-2074": "You are not allowed to show/hide all requests in folder 'r%0' because you are not owner or administrator of this folder.", // cannot hide show all requests

    "1-1-1-V-2075": "You are not allowed to update folder 'r%0' because you are not owner or administrator of this folder.", // no permission to create folder on target folder

    "1-1-1-V-2076": "Are you sure you want to stop running the report 'r%0' ?",

    "1-1-1-V-2077": "You have selected obsoleted criteria.<br>Please delete / re-define these criteria.<br><br>They are being marked \"*** OBSOLETED ***\" at the beginning of the description.", //step4.

    "1-1-1-V-2078": "The input format of Time is invalid, please re-enter.  The format should be like HH:MM (HH:00-23, MM:00-59).", //form items validation;

    "1-1-1-V-2079": "The selected value(s) would return no record. Please select another Code.", //ICD9, addcriteria but no record.
    "1-1-1-V-2080": "The selected value(s) would return no record. Please select another ICD10 Code.", //ICD9, cannot check if the color is red

    "1-1-1-V-2081": "Please provide the name of this Workgroup",
    "1-1-1-V-2082": "Please select at least one active user as Administrator",
    "1-1-1-V-2083": "End value should be greater than start value.", //form items validation;
    "1-1-1-V-2084": "Are you sure you want to delete the shortcut 'r%0' ?", //ivor 20120919, delete short cut 
    "1-1-1-V-2085": "Sequence Number is selected. Please delete the previous one before input a new Sequence Number.", //ivor 20121126, exclude sequement number (only in GRR and).
    "1-1-1-V-2086": "This panel must contain at least one positive item.", //20130221 use in SearchNodeType.
    "1-1-1-V-2087": "Confidential criteria cannot be removed.", //20130221 use in SearchNodeType.


    "1-1-1-V-2090": "Please select defined criteria on the left to add.", // PB 
    "1-1-1-V-2091": "You cannot select mulitple criteria for PB Measurement addition.", // PB 
    "1-1-1-V-2092": "You have defined a PB Measurement Dimension with the same description. <br>Please revise the PB Measurement Dimension Description.", // PB - change <br><br> to <br> for g2 - cindy

    "1-1-1-V-2093": "The Measurement's User Defined Query/Math Function are duplicated.", // Layout measurement
    "1-1-1-V-2094": "You cannot select the folder Node.<br>Please choose your query on the expanded branch.", // Layout measurement
    "1-1-1-V-2095": "Please remove the measurement from the layout grid if you want to clear the selected UD Query", // Layout measurement
    "1-1-1-V-2096": "Due to change of Data Source from step1, layout item \"r%0\" has to be removed.", // step4 preload remove
    "1-1-1-V-2097": "You cannot select a NOT criteria as Patient-Based Criteria.", // PB
    "1-1-1-V-2098": "For security reason, layout item \"r%0\" has to be removed.", // step4 preload remove
    "1-1-1-V-2099": "You have more than 50 items in your selection (including selected items and current selection).<br>Due to system limitations, please reduce the number of items and try again.", //ivor20140120, for dxpx, limited 50 items
    "1-1-1-V-2101": "You can select r%0 for once only.", //ivor20140120, for dxpx, limited 50 items
    "1-1-1-V-2102": "The description of your combo is too long after auto-merge, those two combo cannot be merge.", //ivor20140425 
    "1-1-1-V-2103": "The Selected Patient Based Criteria already existed.", // change Patient- Based to Patient Based for consistent in G2 - cindy


    // *** for report history ***
    "1-1-1-V-2204": "You do not have write permission to the folder 'r%0'.",  //
    "1-1-1-V-2205": "You do not have permission to move this request because you are not owner/ administrator of the containing folder.",  //
    "1-1-1-V-2206": "You are not allowed to create shortcut for this request because you are not owner of this request.",  //
    "1-1-1-V-2207": "This report is hidden as it may contain problem and is under review. Are you sure to view/export this report?.",  // confirm message for view a hidden report.
    "1-1-1-V-2208": "You are not allowed to move folder to \"Shared Requests\".",
    "1-1-1-V-2209": "You are not allowed to move folder from \"Shared Requests\".",
    "1-1-1-V-2210": "Please select at least one active user as Administrator.",
    //"1-1-1-V-2211": "Are you sure to share this folder to the System Workgroup?",
    "1-1-1-V-2212": "Please note that this folder is being shared to:<br>r%0The requests can be viewed by all the users involved in the above workgroups.",   // step 4 prompt
    "1-1-1-V-2213": "Are you sure to share this folder to the following System Workgroup? r%0",
    "1-1-1-V-2214": "Since you do not have write permission to this folder, the request will be saved to your personal folder instead.",
    "1-1-1-V-2215": "Invalid charater.",
    "1-1-1-V-2216": "Please note that the target folder is being shared to:<br>r%0The requests/shortcuts can be viewed by all the users involved in the above workgroups.",   // request move
    "1-1-1-V-2217": "The access right of folder owner cannot be removed.",
    "1-1-1-V-2218": "The users/workgroups cannot be removed because they are involved in member folders.  Please check 'Apply to Sub Folder' if you want to override the access right settings for subfolders.",
    "1-1-1-V-2219": "You are not allowed to move this request to your personal folders because you are not owner of the request.",
    "1-1-1-V-2219_2": "You are not allowed to move this request in search function because you are not owner of the requests.",

    "1-1-1-V-2220": "The access right of this folder is reset to folder owner only. Do you want to change access right?",
    //"1-1-1-V-2221": "The access right of this folder is reset to default i.e. same as parent folder.",   // ivor 20120919, no use
    "1-1-1-V-2222": "The access right of this folder is reset to folder owner and you. Do you want to change access right?",
    "1-1-1-V-2223": "The combination of dimension with different data source is invalid!",

    //"1-1-1-V-2223": "The access right of this folder will be reset to default. Are you sure?",  // ivor 20120919, no use
    "1-1-1-V-2224": "The access right of this folder will be set to the same as parent folder. Are you sure?",
    "1-1-1-V-2225": "The access right of this folder will be cleared. Are you sure?",
    "1-1-1-V-2226": "The access right of this folder will be reset to the same as parent folder. Are you sure?",
    "1-1-1-V-2227": "The access right of this folder will be cleared and you will need to assign the access right to this folder again. Are you sure?",
    "1-1-1-V-2228": "Are you sure?",
    "1-1-1-V-2229": "Change Password Error. Please check your correct password and try again. ", // change password (first time login)

    // "1-1-1-V-2230": "NOT criteria cannot be first postion in Final Query. ",

    //multi export file
    //"1-1-1-V-2230": "Total export files size should be smaller than or equal to 50Mb.",
    "1-1-1-V-2230": "Total export files size should be smaller than or equal to ",
    "1-1-1-V-2232": "Please click the Password Lock Icon to view the password.",
    "1-1-1-V-2233": "Selected requests must be all with or all without password protected.",
    "1-1-1-V-2230_1": "The first selected criteria operation cannot be 'NOT'.",

    "1-1-1-V-2231": "Are you sure to delete?",

    //Message for Publish Hins Text
    "1-1-1-V-2234": "Show author's name and hospital. Result data will not be published for detail report.",
    //"1-1-1-V-2235": "Hide Author's name, hospital and Requests Hospital Infomation. Result data will not be published.",  
    "1-1-1-V-2235": "Hide author's name and hospital and hospital information in the request.  Result data will not be published for detail report.",
    "1-1-1-V-2236": "Not Publish",

    // *** for user profile ***
    "1-1-1-V-2301": "Disk Quota should be between 'r%0' and 'r%1' Mb.",
    "1-1-1-V-2302": "Please select CDARS User Group.",
    "1-1-1-V-2303": "Password and Confirm Password do not match.",
    "1-1-1-V-2304": "Password must be different from User Login ID.",
    "1-1-1-V-2305": "New password cannot equal to current password.",
    "1-1-1-V-2306": "Password should be at least 8 characters.",
    "1-1-1-V-2307": "The original password is incorrect.",
    "1-1-1-V-2308": "Error occured while updating password.",
    "1-1-1-V-2309": "Error occured while updating user profile.",
    "1-1-1-V-2310": "Error occured while assigning user groups.",
    "1-1-1-V-2311": "User Profile has been saved sucessfully.",
    // *** create new user
    "1-1-1-V-2331": "User already existed.",
    "1-1-1-V-2332": "Error occured while creating user.",
    "1-1-1-V-2333": "User is created successfully.",

    // *** email address in user profile
    "1-1-1-V-2334": "Only one HA Staff Email can be registered.",
    "1-1-1-V-2335": "Invalid HA Staff Email. i.e. haEmailAcc@ha.org.hk",
    "1-1-1-V-2336": "Email Address can not be empty while Override Email Address option is clicked.",
    "1-1-1-V-2337": "System will send out the activation code now.<br>Please check your mail box.",
    "1-1-1-V-2338": "System will send out the activation code to target user now.",
    "1-1-1-V-2339": "Invalid charater is detected on Email Address.",

    "1-1-1-V-2340": "The order for each item cannot be deplicated.",
    "1-1-1-V-2341": "The order of Hospital should be before Specialty.",

    // confirm message 
    "1-1-1-V-3002": "Are you sure to reset the current layout?",  //Step4, reset confirm message

    "1-1-1-V-3003": "Your current account security setting prohibits you from editting a detail report.<br>You will be directed back to Report History.",

    "1-1-1-V-3004": "Since there is no saved criteria,<br> the system will go to Step 2 - Select Criteria.",

    "1-1-1-V-3005": "Since r%0 is specified in r%1 and your account security setting " +
        "does not allow you to specify it for some institutions, " +
        "You should either select fewer institutions or remove " +
        "r%0 in r%1.",

    //[To UAT Start]
    "1-1-1-V-3006": "The year format of r%0 should be in 4 digits.",
    //[To UAT END]
    "1-1-1-V-3007": "Since there is no saved criteria, <br>the system will go to step 2 now.",

    "1-1-1-V-3008": "The search keyword should contain more than one character.",

    "1-1-1-V-3009": "Please highlight a concept from the Organism Tree in order to show hierarchy.",

    "1-1-1-V-3010": "Please specify Service Type(s).", //form items validation;
    "1-1-1-V-3011": "Please specify Clinic(s).", //form items validation;
    "1-1-1-V-3012": "Your account security settings allow you to select only one clinic from the Clinic Tree.<br>You must revise your clinic selection in order to complete this step.", //form items validation;
    "1-1-1-V-3013": "Please select Service Type(s).", //form items validation;
    "1-1-1-V-3014": "You cannot select more than 200 OPAS specialties/sub-specialties. Please refine your selection and submit again.", //form items validation;
    "1-1-1-V-3015": "Please select at lease one value from the tree.", // input central


    "1-1-1-V-3016": "Some institutions of the original request have been removed due to your account security setting.", // Edit shared request
    "1-1-1-V-3017": "Upload file with HKID is removed due to security prolicy.", // Edit shared request
    "1-1-1-V-3018": "Since your account security setting does not allow you to specify institutions in your upload file. The Upload file will be removed by the system.", // Edit shared request
    "1-1-1-V-3019": "The layout option is changed from Detail Report to Summary Report since the Detail access right of your account is not sufficient.", // Edit shared request
    "1-1-1-V-3020": "'r%0' should be numeric and integral.",
    "1-1-1-V-3021": "'r%0' should be later than or equal to Maximum 'r%1' in the Uploaded File.",
    "1-1-1-V-3022": "System has deleted all of your selected follow-up criteria (if any) <br>due to a change in Cohort Type / Recruitment Hospitals.<br>You are directed to Step 4 Follow-Up Criteria Selection to re-define your follow-up criteria.",
    "1-1-1-V-3023": "System has deleted all of your selected follow-up criteria (if any) due to a change in Cohort Type / Follow-Up Hospitals.<br>You are directed to Step 4 Follow-Up Criteria Selection.",
    "1-1-1-V-3024": "System has deleted all of your selected follow-up criteria (if any) <br>due to a change in Cohort Type / Recruitment Hospitals.<br>Please go to Step 4 Follow-Up Criteria Selection to re-define your follow-up criteria.",
    "1-1-1-V-3025": "System has detected a change of recruitment type from date-range specification to file upload.<br>You are directed to Step 4 Follow-Up Criteria Selection.",
    "1-1-1-V-3026": "System has detected a change of recruitment type from file upload to date-range specification.<br>You are directed to Step 2 Recruitment Criteria Selection.",
    "1-1-1-V-3027": "Please select at least 1 Data Source.",
    "1-1-1-V-3028": "You have changed some options in step 1, ie. change from upload to date range.<br>You must define the patient criteria before going to Layout.",
    //usser defined dimension
    "1-1-1-V-3029": "Please add Query to Dimension.",
    "1-1-1-V-3030": "Your request contains obsoleted dimension element(s).<br>You have to delete / re-define these items.<br>They are being marked \"*** OBSOLETED ***\" at the beginning of the description.",
    "1-1-1-V-3031": "Dimension item 'r%0'  already exist.",
    "1-1-1-V-3032": "Duplicated logic is found.<br>Logic: r%0 <br>Affected group: r%1 , r%2",
    "1-1-1-V-3033": "Dimension Group with all \"Don't Care\" values is not allowed. <br>Please change the value and try again.",
    "1-1-1-V-3034": "Please define dimension details before submit.",
    "1-1-1-V-3035": "Name already in use by system defined dimension / column description.",
    "1-1-1-V-3036": "Dimension name already in use.",
    "1-1-1-V-3037": "Error occured while saving User Defined Dimension.",
    "1-1-1-V-3038": "Error occured while saving Dimension.",
    "1-1-1-V-3039": "Error occured while updating Dimension.",
    "1-1-1-V-3040": "Please select a query instead of a folder.",
    //user defined date
    "1-1-1-V-3041": "The new name has been used by other User-Defined Date you have created.<br>Please assign a new name.",
    "1-1-1-V-3042": "Your User Defined Date contains obsoleted criteria.<br>" +
        "You have to delete / re-define the item.<br><br>" +
        "It is being marked '*** OBSOLETED ***' at the beginning of the criteria description.",
    //user defined group
    "1-1-1-V-3043": "You've entered invalid lower/upper bound value(s).",
    "1-1-1-V-3044": "Default Group cannot be deleted.",
    "1-1-1-V-3045": "Upper Bound must be greater than Lower Bound.",
    "1-1-1-V-3046": "Please define User Defined Grouping Details.",
    "1-1-1-V-3047": "The new name has been used by other User-Defined Grouping you have created.<br>Please assign a new name.",
    "1-1-1-V-3048": "Error occured while saving User Defined Grouping.",
    "1-1-1-V-3049": "Error occured while updating User Defined Grouping.",

    "1-1-1-V-3050": "You have amended the list of data source selected.Relations between data sources in step 2 and selected measurements in step 4 will be cleared.",
    "1-1-1-V-3051": "r%0 date changed. Please revise the selected criteria in step 2 and the respective measurements in step 4.",
    "1-1-1-V-3052": "You need to remove your upload file before swapping the layout type as you have not enough access right to access some of hospital(s) specified in your upload file.",
    "1-1-1-V-3053": "The 'Period From' and 'Period To' you have input are not valid according to the date range you have uploaded. They will be replaced by minimum and maximum dates specified in upload file respectively when proceed to next step.",

    //user defined interval
    "1-1-1-V-3054": "The new name has been used by other User-Defined Interval you have created.<br>Please assign a new name.",
    "1-1-1-V-3055": "Your User Defined Interval contains obsoleted Date(s).<br>" +
        "Please remove those items with grey radio button.<br><br>" +
        "It is being disabled(option with grey color). '*** OBSOLETED ***' at the beginning of the description.",
    "1-1-1-V-3056": "The defined 'End Date Item' has been removed.<br>The next available date item is selected for you.",
    "1-1-1-V-3057": "The defined 'Start Date Item' has been removed.<br>The next available date item is selected for you.",

    // alert message. 
    //"1-1-1-V-3058": "Step2 is bypassed in upload file.",
    "1-1-1-V-3058": "Step2 is bypassed when retrieving information with a list of patient.",
    "1-1-1-V-3059": "Due to data protection of half public report, Hospital code has been removed.", // Half public 

    "1-1-1-V-3060": "The combo must contain at least one postive item.",

    // for upload request mapping
    "1-1-1-V-3070": "You should either select a 'r%0 Date' within the drop down list or input a date in the fixed date field.",
    "1-1-1-V-3071": "You should either select a 'r%0 Date' within the drop down list or input a date in the fixed date field. You can:<br>" +
        "- clear selection in the 'r%1 Date' list; OR<br>" +
        "- clear date input in the fixed date field.",
    "1-1-1-V-3072": "Please input the 'Request ID' of the source.",
    "1-1-1-V-3073": "Selected request should be with 'New', 'Running' or 'Completed' status.",
    "1-1-1-V-3074": "Selected request is deleted.",
    "1-1-1-V-3075": "Selected request should be a detail report.",
    "1-1-1-V-3076": "You do not have sufficient right to access the selected request.",
    "1-1-1-V-3077": "You are allowed to select your own request only.",
    "1-1-1-V-3078": "Fields below are missing from your selected request:r%0",
    "1-1-1-V-3079": "r%0 should be choose with 'r%1' within the drop down list.",
    "1-1-1-V-3080": "r%0 +/- and interval should both be entered.",
    "1-1-1-V-3081": "Please input a Request ID and map the input columns by clicking the 'Validate Request' button.",
    "1-1-1-V-3082": "You are not allowed to access the source request.<br>Source request will be removed.",
    //error message in MO incharge, for SR
    "1-1-1-V-3083": "You have more than 10 items in your selection, please reduce the number of items and try again.",


    //express
    //"1-1-1-V-3101": "The selected Item must be in same Analysis Type",
    //"1-1-1-V-3102": "The selected Item must be in same Layout Type",
    "1-1-1-V-3101": "The selected Item must be in same Category",
    "1-1-1-V-3102": "The selected Item must be in same Category",


    "1-1-1-V-3103": "Institution is a compulsory field that must be specified.",
    "1-1-1-V-3104": "Date range is a compulsory field that must be specified.  You can either specify the date range as 'Discharge Date', 'Admission Date', 'Attendance Date' or 'Hospitalization Date' under Compulsory Basic Criteria.",

    "1-1-1-V-3105": "Cannot contain two Date range",
    "1-1-1-V-3106": "Cannot contain two Institution",

    "1-1-1-V-3107": "Service Type is a compulsory field that must be specified.",
    "1-1-1-V-3108": "Cannot contain two Service Type",

    "1-1-1-V-3109": "Please also input the Date range.  You can either specify the date range as 'Discharge Date', 'Admission Date', 'Attendance Date' or 'Hospitalization Date'.",

    "1-1-1-V-3120": "Please specify Specialty.", //form items validation;

    "1-1-1-V-3121": "Please select at least one hospital with clinics for OP-Appointment analysis.", //form items validation;

    "1-1-1-V-3122": "The format of r%0 should be r%1.", //michael 2018-01-02




    //new msg by cindy
    "cdarsg2-login-UsernamePassword": "Your Login Hospital, User Name and Password Combination does not exist.",
    "cdarsg2-login-CMSdars_yn": "Your CMS account does not permit you to access CDARS <br>OR<br> the system interface is not updated yet.",
    "cdarsg2-login-NotEffective": "Your account exists but is not effective yet.",
    "cdarsg2-login-AccountExpired": "Your account has been expired.",
    "cdarsg2-login-NoUserGroup": "You have no CDARS User Group Assigned.",
    "cdarsg2-login-InactiveUser": "Your CDARS account is inactive since you haven't logon CDARS for 12 months or more. <br>Please contact your CDARS Hospital Coordinator to re- activate your account.",
    "cdarsg2-login-CdarsExpired": "Your account has been expired.",
    "cdarsg2-login-ladap_not_found": "We cannot proceed your log-on because of technical issue. Should you have any queries, please contact HO CDARS coordinator.",
    "cdarsg2-login-Error": "There has been a system internal error.",
    "cdarsg2-login-DBError": "The system is busy. Please try again later.",
    "cdarsg2-login-SessionExpired": "Your session is expired. Please login again.",


    "cdarsg2-ip-0001": "Query is saved successfully.",
    "cdarsg2-ip-0002": "Query Name already exists.<br/>Please try to use another name.",
    "cdarsg2-ip-0003": "Error occured while saving query.<br/>Please contact CDARS support.",
    

    "cdarsg2-pb-0001": "The final query of Patient Based Criteria cannot be empty.",
    "cdarsg2-pb-0002": "NOT criteria cannot be used as Final Query.",
    "cdarsg2-pb-0003": "The criteria is empty.",
    "cdarsg2-pb-0004": "Please define relationship for Data Sources having PB Criteria selected.",
    "cdarsg2-pb-0005": "The final query cannot be empty.",
    "cdarsg2-pb-0006": "Please define criteria for criteria r%0.",
    "cdarsg2-pb-0007": "The selected criteria is referenced by Patient Based criteria.",
    "cdarsg2-pb-0008": "Please define relationship for final criteria.",
    "cdarsg2-pb-0009": "The query must contain more than 1 criteria.",
    "cdarsg2-pb-0010": "Please fix the error of criteria r%0 before further actions.",
    "cdarsg2-pb-0011": "Please note that the Patient Based Criteria will also be reset.<br/>Are you sure you want to reset?",
    "cdarsg2-pb-0012": "Please define criteria in at least 1 data source.",
    "cdarsg2-pb-0013": "Selected Criteria is referenced by another criteria. Item cannot be deleted.",
    "cdarsg2-pb-0014": "Layout item \"r%0\" has been removed because of the following reasons: <br/> 1. 'Edit and submit' <br/> 2. back to previous step(s)",


    "cdarsg2-criteriaTree-0001": "Search keywords cannot be empty",
    "cdarsg2-criteriaTree-0002": "The length of keywords must equal or greater than 2.",
    
    "cdarsg2-selectedCriteriaList-0001": "Please fix the error of the following criteria(s) before further actions: <br/>r%0",
    
    
    // new msg by ASL
    "cdarsg2-drugSelected-0001": "You have more than 10 items in your selection, please reduce the number of items and try again.",

    "cdarsg2-drugSelected-0002": "The node you selected contains more than ten child nodes, and no more data is loaded",
    
    "cdarsg2-criteriaList-0001": "The negation of selected criteria is already exist.",
    "cdarsg2-criteriaList-0002": "The selected criteria is already exist.",
    "cdarsg2-criteriaList-0003": "The final criteria is empty.",
    "cdarsg2-criteriaList-0004": "The selected criteria in final criteria must contain at least one criteria without operation 'NOT'.",
    "cdarsg2-criteriaList-0005": "The operation of all selected criteria in final criteria cannot be 'NOT'.",

    "cdarsg2-cmsUserSelectPanel-0001": "You have no permission with selected hospital(s).",

    "cdarsg2-input-0001": "r%0 cannot be empty.",
    "cdarsg2-input-0002": "Current Password is empty",
    "cdarsg2-input-0003": "Activation code is incorrect.",
    "cdarsg2-input-0004": "The lenght of password should more than 5 digit.",
    "cdarsg2-confirm-0001": "Change grouping type will delete your previous defined dimension definition.<br> Do you want to continue?",
    "cdarsg2-confirm-0002": "The new group is overlapping with existing group(s)<br>Continuing this operation will change existing group(s).<br>Do you want to continue?",

    //new msg by tommy
    "cdarsg2-saveLayout-0001": "Layout is saved successfully",
    "cdarsg2-saveLayout-0002": "Name of layout already exists. Please use another name.",
    "cdarsg2-saveLayout-0003": "Loading a layout template will override existing layout, are you sure?",
    "cdarsg2-saveLayout-0004": "Please input Layout name.",

    "cdarsg2-previewLayout-0001": "Please define layout of your detail report.",
    "cdarsg2-previewLayout-0002": "Preview is not supported when PB Query is included.",

    //new msg by Andy
    "cdarsg2-login-account_lock": "Account locked by too many failed password attempts, please contact HO CDARS coordinator.",
    "cdarsg2-menu-cms-block": "r%0 is not allowed through CMS.",

}



export function SystemMsgMapping(errorCode, replaceStr = null) {
    if (errorCode) {
        if (replaceStr) {
            let msg = ErrorCodeMsg[errorCode];
            console.log(replaceStr);
            for (const [idx, val] of replaceStr.entries()) {

                msg = msg.replace("r%" + idx, val);
            }

            return msg;
        } else {
            return ErrorCodeMsg[errorCode];
        }
    }

    return "";
}
